﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ePlanet.ArchiveBorrow.Models;

namespace Web.UserControls
{
    public partial class ArchiveBorrowManager : System.Web.UI.UserControl
    {
        #region 私有属性
        private ArchiveBorrowModel m_ArchiveBorrowModel = null;
        /// <summary>
        /// 档案借阅对象
        /// </summary>
        public ArchiveBorrowModel ArchiveBorrowModelProperty
        {
            get { return m_ArchiveBorrowModel; }
            set { m_ArchiveBorrowModel = value; }
        }

        private bool m_IsPaperArchiveLend = false;
        /// <summary>
        /// 纸质文档是否已经借出
        /// </summary>
        public bool IsPaperArchiveLend
        {
            get { return m_IsPaperArchiveLend; }
            set { m_IsPaperArchiveLend = value; }
        }

        #endregion
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                this.BindModelData();
                this.SetPaperArchiveEnable();
            }
            this.CollectModel();
        }

        #region 私有方法
        /// <summary>
        /// 绑定借阅对象到控件
        /// </summary>
        private void BindModelData()
        {

        }

        /// <summary>
        /// 设置纸质文档的可写可读
        /// </summary>
        private void SetPaperArchiveEnable()
        {
            ///若纸质文档已经借出，则不能重新借阅
            if (this.m_IsPaperArchiveLend)
            {

            }
            else
            {

            }
        }

        /// <summary>
        /// 收集Model对象
        /// </summary>
        private void CollectModel()
        {

        }
        #endregion
    }
}